 /**
 * sends out a logout rest call
 */
function logout() {

			$.ajax({
				url : '/easyskool/rest/userauthservice/logout',
				type : 'POST',
				data : '{}',
				dataType : 'json',
				contentType : "application/json; charset=utf-8",
				success : function(data, testStatus, response) {
					$a = response.responseText;

					var json = JSON.parse(response.responseText);
						if (json.logout == "success") {
							window.location = "/easyskool/Login/login.jsp";
						}
					  else if (json.logout == "fail") {
						    alert("Logout Failed");
						    window.location = "/easyskool/Login/login.jsp";
						} 
					  else
					  {
						alert(json.logout);
						window.location = "/easyskool/Login/login.jsp";
					}
				}
			});

		}